const store = {
  state: {
    // 放数据
    routes: []
  },
  actions: {
    // 放同步方法
    saveRoutes(
      newState: { routes: Object },
      action: { type: string; val: Object }
    ) {
      newState.routes = action.val
    }
  },
  asyncActions: {
    // 放异步方法
  },
  actionNames: {}
}
let actionNames = {}
for (let key in store.actions) {
  actionNames[key] = key
}
store.actionNames = actionNames

export default store
